package model;



public abstract class Model{

	public Model(long id){
		this.id=id;
	}
	public Model (){
		this.id=NO_ID;
	}
	public String toString(){
		return "ID: "+this.id;
	}
	/**
	 * @return
	 */
	public long getId(){
		return this.id;
	}
	
	/**
	 * @param id
	 */
	public void setId(long id){
		this.id = id;
	}

	public boolean equals(Object obj){
		if (obj instanceof Model){
			return this.getId()==((Model) obj).getId();
		}
		else return false;
	}
	
	/**
	 */
	private long id;
	public final static long NO_ID=0L;
}
